package com.aimusic.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表（手机号登录核心表）
 * </p>
 *
 * @author author
 * @since 2025-09-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="用户表（手机号登录核心表）")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID（主键）")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "手机号（登录账号，唯一）")
    private String phone;

    @ApiModelProperty(value = "密码（bcrypt加密后存储）")
    private String password;

    @ApiModelProperty(value = "用户名/昵称")
    private String username;

    @ApiModelProperty(value = "账号状态：0=禁用，1=正常")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "在线状态：0=离线，1=在线，2=忙碌，3=离开")
    private Integer onlineStatus; // 在线状态：0=离线，1=在线，2=忙碌，3=离开

    @ApiModelProperty(value = "最后活跃时间")
    private LocalDateTime lastActiveTime; // 最后活跃时间

}
